//
//  BubbleView.h
//  Saas
//
//  Created by 黄志刚 on 2020/3/11.
//  Copyright © 2020 bing. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSUInteger, BubbleLocation) {
    BubbleLocationUp,       // 上
    BubbleLocationRight,    // 右
    BubbleLocationDown,     // 下
    BubbleLocationLeft,     // 左
};// 气泡位置

typedef NS_ENUM(NSUInteger, BubbleAlignment) {
    BubbleAlignmentCenter, // 居中
    BubbleAlignmentLeft,   // 靠左
    BubbleAlignmentRight,  // 靠右
    BubbleAlignmentTop,    // 顶部对齐
    BubbleAlignmentBottom  // 底部对齐
};// 气泡对齐方式

typedef void (^BubbleHideBlock)(void);// 气泡隐藏后回调

@interface BubbleView : UIView

- (instancetype)initWithLocation:(BubbleLocation)location bubbleAlignment:(BubbleAlignment)alignment width:(CGFloat)width height:(CGFloat)height hideBlock:(BubbleHideBlock)hideBlock;
- (void)showWithTargetView:(UIView *)targetView maskSuperView:(UIView *)maskSuperView;
- (void)hide;








@property (nonatomic,strong) UIView *mainView;// 除去三角形之外的区域
@end

NS_ASSUME_NONNULL_END
